<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
    <title>银行理财信息</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="jquery/jquery-3.4.1.min.js"></script>
</head>
<body>
<div class="container">
    <h1 class="text-center">银行理财信息</h1>
    <div class="row">
        <div class="col-sm-10">
            <form action="show" method="post" class="center-block form-inline">
                <div class="form-group">
                    产品代码:<input type="text" class="form-control" name="id" value="${id!''}">
                </div>
                风险评级:
                <select name="risk" id="risk" class="form-control" style="width: 200px">
                    <option value="0">请选择</option>
                    <option value="1">R1</option>
                    <option value="2">R2</option>
                    <option value="3">R3</option>
                </select>

                <input type="submit" value="查询" class="form-control btn btn-primary">
            </form>
        </div>
        <div class="col-sm-2">
            <a href="/toadd" class="btn btn-info">新增理财信息</a>
        </div>
    </div>
    <div class="row">
        <table class="table table-bordered table-striped table-hover">
            <thead>
            <tr>
                <th>产品代码</th>
                <th>风险评级</th>
                <th>预期收益</th>
                <th>发售起始日</th>
                <th>发售截止日</th>
                <th>产品到期日</th>
            </tr>
            </thead>
            <tbody>
                <#if (pdpd.data)??>
                    <#list pdpd.data as product>
                        <tr>
                            <td>${product.id}</td>
                            <#switch product.risk>
                                <#case 1><td>R1</td><#break >
                                <#case 2><td>R2</td><#break >
                                <#case 3><td>R3</td><#break >
                                </#switch>
                            <td>${product.income}</td>
                            <td>${product.saleStarting?date}</td>
                            <td>${product.saleEnd?date}</td>
                            <td>${product.end?date}</td>
                        </tr>
                    </#list>
                </#if>
            </tbody>
            <tfoot>
            </tfoot>
        </table>
    </div>
    <div class="col-md-12">
        <nav aria-label="Page navigation">
            <ul class="pagination">
                <li><a href="show?pageNo=1&risk=${risk!''}&id=${id!''}">首页</a> </li>
                <#if pdpd.previousPage == true>
                    <li>
                        <a href="show?pageNo=${pageNo-1}&risk=${risk!''}&id=${id!''}" aria="label="Previous">
                        <span aria-hidden="true">上一页</span>
                        </a>
                    </li>
                </#if>
                <#list 1..pages as page>
                    <#if page == pageNo>
                        <li class="active"><a>${pageNo}</a></li>
                    </#if>
                    <#if page != pageNo>
                        <li> <a href="show?pageNo=${page}&risk=${risk!''}&id=${id!''}">${page}</a></li>
                    </#if>
                </#list>
                <#if pdpd.nextPage == true>
                    <li>
                        <a href="show?pageNo=${pageNo+1}&risk=${risk!''}&id=${id!''}" aria-label="Next">
                            <span aira-hidden="true">下一页</span>
                        </a>
                    </li>
                </#if>
                <li><a href="show?pageNo=${pages}&risk=${risk!''}&id=${id!''}">末页</a></li>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <li><span aira-hidden="true">当前第：${pageNo}页，总共：${pages}页，总共：${alldatacount}条记录</span></li>
            </ul>
        </nav>
    </div>
</div>
<script type="text/javascript">

</script>
<script type="text/javascript">$("option[value=${risk}]").attr("selected",true);</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>
